﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;



public partial class Admin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int Login = System.Convert.ToInt32(Session["IsLogin"]);
        if (Login!=2)
        {
            Response.Redirect("Login.aspx");
            Response.End();
        }
        string Welcome = Session["UserId"].ToString();
        Login_Welcome.Text = "欢迎您，"+Welcome+"!";

        //SqlConnection conn = new SqlConnection();
        //conn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionStringProManage"].ConnectionString;
        //try
        //{
        //    conn.Open();
        //    string sql = "select value from Configure where (flag=1 and attribute='danwei')";
        //    SqlCommand cmd = new SqlCommand();
        //    cmd.Connection = conn;
        //    cmd.CommandType = CommandType.Text;
        //    cmd.CommandText = sql;
        //    string danwei = cmd.ExecuteScalar().ToString();

        //    LabDanwei.Text = danwei;

        //}
        //finally
        //{
        //    conn.Close();
        //}
    }
}